#ifndef _IUMODULEARP_HPP_
#define _IUMODULEARP_HPP_

#include "iuARPTable.hpp"

class iuPacketARP;
class iuIPAddress;
class iuInterface;

/**
 * @brief Classe chargee de gerer les differents paquets ARP:
 * Elle se charge de l'envoie de requetes ARP et de la mise a
 * jour du cache ARP.
 */
class iuModuleARP
{
public:
   iuModuleARP();

   void receivePacket(iuPacketARP &packet, iuInterface &in);
   void sendRequest(iuIPAddress ip, iuInterface &in);

   void        setOnReplyCallback(void (*callback)(const iuARPEntry &entry, void *data), void *data);
   iuARPTable &getARPTable();

private:
   iuARPTable m_table;
   void (*m_onReplyCallback)(const iuARPEntry &entry, void *data);
   void *m_onReplyData;
};

#endif
